package mapred.example;

import java.util.Random;

import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.Partitioner;

public class RandomPartitioner implements Partitioner<Writable, Writable> {

	@Override
	public int getPartition(Writable key, Writable value, int N) {
		return new Random().nextInt(N);
	}

	@Override
	public void configure(JobConf conf) {
	}

}
